//
//  BrandPageModel.swift
//  MikerShop
//
//  Created by eme on 2017/1/5.
//  Copyright © 2017年 eme. All rights reserved.
//

import Foundation
import SwiftyJSON
import ModelProtocol

///品牌详情model
class BrandPageModel: ModelProtocol {
    /// 商品信息
    var newPdList:[HpProductModel]
    /// 品牌信息
    var glBrandRepertory:HpBrandModel
    
    // MARK: 实现MikerSwiftJSONAble 协议， 解析json数据
    required  init?(json: JSON) {
        glBrandRepertory = HpBrandModel(json: json["glBrandRepertory"])!
        newPdList = []
        if let items = json["newPdList"].array {
            for item in items {
                if let productModel = HpProductModel(json: item){
                    newPdList.append(productModel)
                }
            }
        }
    }
    
}
